<%--
  Created by IntelliJ IDEA.
  User: zhanzhongxin
  Date: 2021/8/10
  Time: 9:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="css/style.css">
    <script src="js/jquery-3.6.0.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('button').click(function () {
                $.ajax({
                    url: '/maventest_war_exploded/ajax',
                    data: {
                        name: 'zhangsan',
                        passwd: '123456'
                    },
                    success(res) {
                        console.log(res);
                        let stu = JSON.parse(res);
                        console.log(stu);
                    }
                })
            })
        })
    </script>
</head>
<body>
<a href="${pageContext.request.contextPath}/stu?method=queryStudents">查询学生</a>
<div>abc</div>
<button>ajax请求</button>
</body>
</html>
